import os

import pandas as pd
import json

csv_folder = "/Users/user/project/gitee/ik/python/ttt"
json_text = {}
for csv_file in os.listdir(csv_folder):
    csv_file_name = csv_file.split(".")[0]
    json_text[csv_file_name] = []
    csv_file_path = os.path.join(csv_folder, csv_file)
    chunk_iter = pd.read_csv(csv_file_path, chunksize=1)
    for chunk in chunk_iter:
        x, y, _ = chunk
        json_text[csv_file_name].append([int(x), int(y)])
with open("./MITOSIS2014.json", 'w', encoding='utf-8') as fw:
    json.dump(json_text, fw)
